Outpost2 UnitTypeInfo structure

A table of pointers to these structures can be found at address 004E1348.


Building data repeats in 44 byte chunks. (68 bytes chunks?) (Depends on unit type)
Chunks start at offset 8.

Offset 	Size 	Description
------ 	---- 	-----------
0x0 	4 	vtbl
0x4 	4 	unitType (see map_id enum)
---------------------------
0x8 	4 	hitPoints
0xC 	4 	
0x10 	4 	armor?
0x14 	4 	commonOreCost
0x18 	4 	rareOreCost
0x1C 	4 	buildTime
0x20 	4 	sightRange (= weaopnRange for weapons)
0x24 	4 	numUnitsOfType
0x28 	4 	
0x2C 	4 	
0x30 	4 	turnRate (?)
0x34 	4 	
0x38 	4 	reloadTime
0x3C 	4 	sightRange
0x40 	4 	
0x44 	4 	
0x48 	4 	moveRate
0x4C 	4 	turnRate
0x50 	4 	
0x54 	4 	
0x58 	4 	
0x5C 	4 	
0x60 	4 	
0x64 	4 	
0x68 	4 	
0x6C 	4 	

0x1E4	4	int requiredTechNum
0x1E8 	4 	
0x1F4 	4 	
0x1F8	?	Unit name (eg. "Cargo Truck", displayed in rollover popup text)


0x2A4 	1 	
0x2A5 	1 	


UnitTypeInfo:Building
---------------------
0x2C	4	int powerRequired
0x30	4	int numWorkersRequired
0x34	4	int numScientistsRequired
0x38	
0x3C	4	int powerProduction
0x40	4	int numBays
0x44	4	int techNum?
0x48	4	

0x1E4	4	int requiredTechNum

0x248 	2 	short buildingTileWidth (dock tileX offset? no)
0x24A 	2 	short buildingTileHeight (dock tileY offset? no)
0x24C 	4 	int buildingInitialFlags (0x40 is OppFiredUpon)

0x250	4*?	int[] edenAnimationIndex
0x278	4*?	int[] plymouthAnimationIndex


UnitTypeInfo:Building:Observatory
---------------------------------
0x25	1	


UnitTypeInfo:Vehicle
--------------------
0x1E8	4	trackType


UnitTypeInfo:Weapon
-------------------
0x20	4	weaponRange
0x30	4	concussionDamage
0x34	4	penetrationDamage

0x248	4	weaponBlastPixelRadius
0x254	4	fireSoundIndex (sound heard when the weapon fires)
0x258	4	explosionSoundIndex (sound heard when the weapon hits)


UnitTypeInfo:Disaster
---------------------
0x1E4	4	disasterWarnTechNum  [requiredTechNum]


UnitTypeInfo:Disaster:Earthquake
--------------------------------
0x30	4	int concussionDamage	[0x3C = 60]
0x34	4	int pentrationDamage	[0x19 = 25]



Vtbl Functions
--------------
Index 	Offset 	Description
----- 	------ 	-----------
0x0	0x0	Unit* CreateUnit(int pixelX, int pixelY, int unitIndex = 0)
0x1	0x4	char* GetUnitName() (Returns internal name, like those used in tech files)
0x2	0x8	bool SaveUnitTypeInfo(StreamIO *saveGameFile)
0x3	0xC	bool LoadUnitTypeInfo(StreamIO *saveGameFile)
0x4	0x10	bool Initialize()
0x5	0x14	void ???(???)
0x6	0x18	int? ???(???, ???)


Unit stats can be found at the following addresses:

Address 	Unit Type
------- 	---------
551370 		Common ore smelter
